package com.itheima.controller;

import com.itheima.domain.DTO.LoginDTO;
import com.itheima.domain.vo.LoginVO;
import com.itheima.domain.vo.Result;
import com.itheima.mapper.EmpMapper;
import com.itheima.service.EmpService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:篍
 * @Date: 2025/07/17 9:04
 * @Description:
 */
@Slf4j
@RestController
public class LoginController {
    @Autowired
    EmpService empService;



    @PostMapping("/login")
    public Result login(@RequestBody LoginDTO loginDTO){
        //
        return empService.login1(loginDTO);

//        LoginVO loginVO= empService.login(loginDTO);
//        //
//        return Result.success(loginVO);
    }
}
